home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / pcfolded.zip / FOLDED.DOC next >
Text File  |  1989-05-30  |  39KB  |  724 lines

  1.                 FOLDED
  2.                A folding editor
  3.               (c) 1989
  4.             By Todd Burkey
  5.  
  6. 1.0 GENERAL:
  7.  
  8.   FOLDED is a dual mode editor that provides several advanced features
  9.   not currently found in text and programming editors. FOLDED is primarily
  10.   intended to be used as a source code editor. As such, it incorporates
  11.   a folding feature similar to that found in thought processor programs
  12.   but with added support for the C language (and eventually Pascal). FOLDED
  13.   also has some relational capabilities. These allow the user to associate
  14.   lines in their source files with sections of their documentation files
  15.   and vice-versa. And both folding and relations are incorporated in such a
  16.   fashion that they don't impact the original text files in any way.
  17.  
  18.  
  19. 2.0 FEATURES:
  20.  
  21.   FOLDED also has the standard set of editor features, with a few bells and
  22.   whistles thrown in. It has dynamic 'as-you-type' searching, substitution by
  23.   block/global/direction of a string or exact word match (i.e. change
  24.   variable i to i_var throughout your code), block copy/move/kill in normal
  25.   or rectangular region modes, marks that allow intra-buffer movement, easy
  26.   movement between buffers, a trash can, variable skipping (point to a
  27.   variable, press ^n to skip to the next occurrence of it, ^p for previous),
  28.   configuration save (you can leave a multi-buffer edit session and come
  29.   back to the exact place you left off with all buffer positions restored),
  30.   built in help, prompting for the beginning user, one-key buffer cloning,
  31.   and more.
  32.  
  33. 3.0 LIMITATIONS:
  34.  
  35.   So what doesn't FOLDED do? Well, the first release will not have an UNDO
  36.   feature. The trash can will have to do. It also is dual mode, something
  37.   which may alienate some of the Emacs users out there (I am bi-editable,
  38.   since I use Emacs on some systems, graphic shell editors on others, vi
  39.   on still others). With a little work, the editor could actually be made
  40.   to work either as a dual mode editor or a single mode editor (hint to
  41.   hackers out there). It also could use some better screen optimization,
  42.   since I tended to develop it on high speed displays. It is usable at
  43.   2400 baud, but any slower than that and you are better off with ed.
  44.   The first release also won't have any key binding capability. I still
  45.   haven't decided upon the best approach to handle user-defined key maps.
  46.   Finally, FOLDED isn't a layered editor. My goals during the development
  47.   of FOLDED were to keep it relatively small (it is about 70K executable,
  48.   <6000 lines of source) and fast, so layering as implemented in emacs-like
  49.   editors was out.
  50.  
  51. 4.0 HISTORY:
  52.  
  53.   I wrote FOLDED simply to learn.  Early on, I made a choice to 1) put
  54.   basic 'must-have' functionality in the editor, 2) put advanced concepts
  55.   into the editor that can't be handled by external programs (folding and
  56.   relational features), 3) implement a simple to use and understand multi
  57.   file editing capability so that moving between files and scratchpads
  58.   was easy, 4) design the editor so that I could add enhanced 'wish-list'
  59.   functionality as I determined I needed it, 5) ensure that the final
  60.   version of the editor would function the same on my Atari ST at home as
  61.   it does on the Sun or Apollo workstations and even as it does on the
  62.   mainframes, and 6) keep the program small (I hate long loading times).
  63.   The latter requirement somewhat dictates the earlier ones...at least
  64.   for the first release.
  65.  
  66.   Having used many editors over the last 15 years, I decided to implement
  67.   (or try to anyway) the features I liked most in the various editors. This
  68.   decision steered me away from any thoughts of modifying an existing editor
  69.   like emacs or vi, hence I diverged from the 'standard' a bit. First, FOLDED
  70.   is an unconstrained editor. You can move your cursor anywhere on the screen
  71.   and when you enter insert mode (or copy a rectangular block of text) FOLDED
  72.   will take care of sticking in needed spaces. Another difference is that the
  73.   editor does not 'wrap' lines. Instead, you can scroll/page the entire window
  74.   sideways when necessary (the editor will do this for you if you are typing
  75.   past the end of the right margin). I got too used to this feature on the
  76.   Apollos, I guess. Also, FOLDED does not retain tab characters. Rather, they
  77.   are replaced with white space on input and FOLDED will optionally 'optimize'
  78.   your file when you write it out (i.e. inserting tabs wherever it can, removing
  79.   trailing spaces on lines, etc). Actually, FOLDED doesn't even retain leading
  80.   spaces in the way you might expect an editor to store them. All leading spaces
  81.   in a line are compressed to an integer variable upon file read-in. The user
  82.   still sees the spaces on the screen, but internally this sped up my folding
  83.   logic (at the cost of almost going insane over the added code complexity...
  84.   there is always a tradeoff).
  85.  
  86. 5.0 COMPATIBILITY:
  87.  
  88.   The first release of FOLDED has been tested on BSD4.2/3 (Suns, Symetric,
  89.   and Apollo), SYSVR3 (ETA-10...haha), the IBM PC, and the ATARI ST. It is
  90.   being ported by others to the Mac. A preliminary port of the code to the
  91.   BELLCORE MGR (window manager) environment took only two hours on a Sun
  92.   workstation and provided individual windows for each buffer (with
  93.   title bars).
  94.  
  95.  
  96. 6.0 EDITING COMMANDS:
  97.  
  98.   When you invoke FOLDED the first time, press the ? key to see a cheat sheet
  99.   that tells you what each key does.  The following section covers the FOLDED
  100.   commands in more detail. Note that whenever you are prompted for something
  101.   in FOLDED, you will see the default response inside of brackets. Pressing
  102.   the Return key will select this response. Also, in most cases, pressing
  103.   the ESC key will return you to the top level command mode of FOLDED. It is
  104.   important to remember that FOLDED is a DUAL mode editor. You start out in
  105.   command mode and must use one of the insert commands to actually add text
  106.   to the file you are editing. While in insert mode, you will continually be
  107.   informed of this fact by a status line on the bottom of the screen.
  108.  
  109. 6.1 REPETITION:
  110.   Sometimes, you will wish to execute a command more than once. To do so,
  111.   press the number keys to indicate the number of times you wish to do
  112.   something and then do it. For example, if you wish to move down 4 pages,
  113.   press 4J or if you wish to delete 8 characters, press 8d. Currently,
  114.   only the movement and character delete commands utilize the feature.
  115.  
  116. 6.2 MOVEMENT:
  117.   The standard 'rogue' keys are used for single character cursor movement :-).
  118.   Thus, the 'k' key will move you up one character, the 'j' key will move
  119.   you down one character, the 'h' key moves you left one character, and the
  120.   'l' key moves you right one character. As a natural extension of this, I
  121.   chose to have the 'K', 'J', 'H', and 'L' keys move you farther in the same
  122.   directions. For example, 'K' and 'J' will page you up and down, while the
  123.   'H' and 'L' keys will move you 20 characters to the left or right.  If you
  124.   are using an ATARI ST, then the arrow keys also function for cursor movement.
  125.  
  126.   You can also go to the beginning of a line by pressing the '^' key and
  127.   go to the end of a line by pressing the '$' key. To go to a specific
  128.   line number, just press the 'g' key and you will be prompted for the
  129.   line number you wish to go to. For those of you who prefer the jump-page
  130.   technique over scrolling, you can toggle between the two modes by pressing
  131.   the 'p' key.
  132.  
  133. 6.3 READING:
  134.   FOLDED allows you to read files in a variety of ways. The standard way is to
  135.   simply invoke FOLDED with a list of files to edit. When you are in FOLDED,
  136.   you can read a file into a new buffer by using the ':r' keys. If you wish
  137.   to view a file (i.e. not be able to edit it), then use the ':v' keys. And,
  138.   if you wish to insert a file into the current buffer, then use the ':i' keys.
  139.   In each case, you will be prompted for the file name you wish to read in.
  140.   Another way of reading files is to simply position the cursor over a file
  141.   name and press '^r' (Control-r). Likewise, you can press '^v